<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>

<?php foreach($db as $id=>$d):?>
	<li>
		<h2><?php echo $d['title'];?></h2>
		<img src="<?php echo $d['thumb'];?>" alt="">
		<p>
			价格：<?php echo $d['price'];?>
		</p>
		<a href="goods.php?id=<?php echo $id;?>">查看商品</a>
	</li>

<?php endforeach;?>
</body>
</html>